<template>
  <div class="app-container">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="会员充值" name="first">
        <vipRecharge />
      </el-tab-pane>
      <el-tab-pane label="余额变动" name="second">
        <balanceChange />
      </el-tab-pane>
      <el-tab-pane label="退卡订单" name="third">
        <cardRefund />
      </el-tab-pane>
      <el-tab-pane label="延期订单" name="fourth">
        <delay />
      </el-tab-pane>
    </el-tabs>
	  
	  
  </div>
</template>

<script setup name="ven_order_vip">
import vipRecharge from './vipRecharge'
import balanceChange from './balanceChange'
import cardRefund from './cardRefund'
import delay from './delay'

const { proxy } = getCurrentInstance()	
const activeName = ref('first')
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const title = ref('')
const open = ref(false)
const loading = ref(true)
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    name: undefined
  },
  rules: {
		
  }
})
const { queryParams, form, rules } = toRefs(data)
// 获取列表
function getList() {
  loading.value = false
}

function reset() {
  form.value = {}
  proxy.resetForm('roleRef')
}
/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1
  getList()
}
/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm('queryRef')
  handleQuery()
}
/** 删除按钮操作 */
function handleDelete(row) {
  const roleIds = row.roleId || ids.value
  proxy.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
    return delRole(roleIds)
  }).then(() => {
    getList()
    proxy.$modal.msgSuccess('删除成功')
  }).catch(() => {})
}
function handleAdd() {
  reset()
  open.value = true
  title.value = '新建场馆'
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.roleId)
  single.value = selection.length != 1
  multiple.value = !selection.length
}


getList()

</script>

<style scoped>

</style>
